/* =========================================================
 * ====                   WARNING                        ===
 * =========================================================
 * The code in this tab has been generated from the GUI form
 * designer and care should be taken when editing this file.
 * Only add/edit code inside the event handlers i.e. only
 * use lines between the matching comment tags. e.g.

 void myBtnEvents(GButton button) { //_CODE_:button1:12356:
     // It is safe to enter your event code here  
 } //_CODE_:button1:12356:
 
 * Do not rename this tab!
 * =========================================================
 */

public void port_click(GDropList source, GEvent event) { 
  selectedPort = portList.getSelectedText();
  portSelected = true;
  portList.setEnabled(false);
  start.setEnabled(true);
  start.setLocalColorScheme(GCScheme.GREEN_SCHEME);
  portList.setLocalColorScheme(GCScheme.CYAN_SCHEME);
}

public void close_click(GButton source, GEvent event) { 
  exit();
}

public void start_click(GButton source, GEvent event) { 
  start.setEnabled(false);
  startPlot = true;
  oxygenSaturation.setVisible(true);
  start.setLocalColorScheme(GCScheme.CYAN_SCHEME);
}


// Create all the GUI controls. 
// autogenerated do not edit
public void createGUI(){
  G4P.messagesEnabled(false);
  G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
  G4P.setCursor(ARROW);
  surface.setTitle("ProtoCentral OpenView for PulseOx");
  
  portList = new GDropList(this, 10, 10, 150, 495, 10);
  portList.setItems(loadStrings("list_626048"), 0);
  portList.setLocalColorScheme(GCScheme.GREEN_SCHEME);
  portList.addEventHandler(this, "port_click");
  
  close = new GButton(this, 340, 10, 100, 45);
  close.setText("CLOSE");
  close.setTextBold();
  close.setLocalColorScheme(GCScheme.GREEN_SCHEME);
  close.addEventHandler(this, "close_click");
  
  start = new GButton(this, 200, 10, 100, 45);
  start.setText("START");
  start.setTextBold();
  start.setLocalColorScheme(GCScheme.GREEN_SCHEME);
  start.addEventHandler(this, "start_click");
  
}

// Variable declarations 
// autogenerated do not edit
GDropList portList; 
GButton close; 
GButton start; 
GLabel oxygenSaturation; 